<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加产品</title>
<script type="text/javascript">
function checkForm(){
	var title=document.getElementById("proModel").value;
	var content=document.getElementById("proName").value;
	var runtool=document.getElementById("proFunction").value;
	var file=document.getElementById("file").value;
	if(title==null||title==""){
		alert("请输入资料标题！");
		return false;
					};
	if(runtool==null||runtool==""){
		alert("请输入运行环境！");
		return false;
					};
	if(content==null||content==""){
		alert("请输入软件语言！");
		return false;
					};
	if(file==null||file==""){
		alert("请上传文件！");
		return false;
						};
		return true;
}
</script>
</head>
<body>
<div id="mainDiv" class="x-panel">
<div id="titleDiv" class="x-panel-header"><!--  此处是附页标题  注2 --></div>
<div id="bodyDiv">
<div id="toolbarDiv" class="x-toolbar"><!-- 此处是工具栏    注3--></div>
<div id="panelBodyDiv" class="x-panel-body"><!-- 此处是主体部分    注4-->
<form id="proForm" name="dataDownload" method="post" target="_self"
	action="${ctx}/download.do?method=insertOne"
	onsubmit="return checkForm();" enctype="multipart/form-data">
<table width="100%" class="datatable">
	<tr>
		<th align="right" width="15%">资料名称：</th>
		<td align="left"><input type="text" size="45"
			name="dataDownload.dataName" id="proModel" /></td>
	</tr>
	<tr>
		<th align="right" width="15%">软件语言：</th>
		<td align="left"><input type="text" size="20"
			name="dataDownload.softLang" id="proName" /></td>
	</tr>
	<tr>
		<th align="right" width="15%">运行环境：</th>
		<td align="left"><input type="text" size="20"
			name="dataDownload.runTool" id="proFunction">
	</tr>
		<tr>
		<th align="right" width="15%">软件类型：</th>
		<td align="left"><select name="dataDownload.dataType"> <option value="1" >宣传资料</option><option value="2" >产品图片</option><option value="3" >视频资料</option> <option value="4" >软件驱动</option> </select>
	</tr>
	<tr>
		<th align="right" width="15%">资料路径：</th>
		<td align="left"><input type="file" id="file" name="file">
		</td>
	</tr>
	<tr>
		<th></th>
		<td align="center"><input type="submit" value="提交" />
		&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" /></td>
	</tr>
</table>
</form>
</div>
</div>
</div>

</body>
</html>